<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>订单中心</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../script/vant/index.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="css/common.css" />
    <link rel="stylesheet" type="text/css" href="css/home_orderlist.css" />
    <style>
        .searchparamitem{
            width: 90%;
            margin: 0 auto;
            overflow: hidden;
        }
        .searchparamitem label{
            height: 1.4rem;
            line-height: 1.4rem;
            margin-top: 0.8rem;
            margin-right: 18px;
            padding: 0px 12px;
            border-radius: 20px;
            float: left;
            background: #ddd;
            font-size: 0.65rem;

        }
        .searchparamitem label.active{
            background: #1a66ff;
            color: #fff;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <!-- 发货 -->
        <van-dialog v-model="sendMsg.showsend" title="发货信息确认" :before-close="beforeClose_send" show-cancel-button >
            <div class="dialog_tishi">
                <div class="dialog_item">
                    <div class="dia_item_title fl">商品信息:</div>
                    <div class="dia_item_dec fr">共{{sendMsg.AllQuantity}}件商品，总重{{sendMsg.AllWeight}}kg</div>
                </div>
                <div class="dialog_item">
                    <div class="dia_item_title fl">收货地址:</div>
                    <div class="dia_item_dec fr">{{sendMsg.AddressDetailInfo}}</div>
                </div>
            </div> 
        </van-dialog>
         <!-- 取消订单 -->
         <van-dialog v-model="show" title="提示信息" :before-close="beforeClose" show-cancel-button >
            <div class="dialog_tishi">订单取消后无法进行任何其它操作，是否确认取消订单？</div> 
        </van-dialog>
        <van-popup v-model="showSelect" position="top" :style="{ height: '3rem',background:'#f3f3f3' }">
            <div class="searchparamitem">
                <label v-bind:class="{'active':activeDate==0}" v-on:click="doClickDay(0)">全部</label>
                <label v-bind:class="{'active':activeDate==1}" v-on:click="doClickDay(1)">今日</label>
                <label v-bind:class="{'active':activeDate==2}" v-on:click="doClickDay(2)">昨日</label>
                <label v-bind:class="{'active':activeDate==3}" v-on:click="doClickDay(3)">近七天</label>
            </div>
        </van-popup>
        <div class="aui-tab" id="tab">
            <div class="coverInfo">
                <ul class="aui-tab-item" style="width:100%;font-size: 0.8rem;">
                    <!-- <li class="menuli" v-for="(item,index) in statusList">
                        <div v-bind:class="{'aui-active':status==item.id}"
                            v-on:click="randomSwitchBtn(item.text,item.id,index)">
                            <label class="labelbox">
                                {{item.text}}
                                <span  class="activespan">{{item.num}}</span>
                            <label>
                        </div>
                    </li> -->
                    <li class="menuli">
                        <div v-bind:class="{'aui-active':status==0}" v-on:click="randomSwitchBtn(0)">
                            <label class="labelbox">全部商品
                            <label>
                        </div>
                    </li>
                    <li class="menuli">
                        <div v-bind:class="{'aui-active':status==1}" v-on:click="randomSwitchBtn(1)">
                            <label class="labelbox">待付款
                                <span v-if="statuscount.NoPaymentCount>0" class="activespan">{{statuscount.NoPaymentCount}}</span>
                            <label>
                        </div>
                    </li>
                    <li class="menuli">
                        <div v-bind:class="{'aui-active':status==5}" v-on:click="randomSwitchBtn(5)">
                            <label class="labelbox">待发货
                                <span v-if="statuscount.NoSendCount>0" class="activespan">{{statuscount.NoSendCount}}</span>
                            <label>
                        </div>
                    </li>
                    <li class="menuli">
                        <div v-bind:class="{'aui-active':status==2}" v-on:click="randomSwitchBtn(2)">
                            <label class="labelbox">待收货
                                <span v-if="statuscount.SendCount>0" class="activespan">{{statuscount.SendCount}}</span>
                            <label>
                        </div>
                    </li>
                    <li class="menuli">
                        <div v-bind:class="{'aui-active':status==3}" v-on:click="randomSwitchBtn(3)">
                            <label class="labelbox">已完成
                                <span v-if="statuscount.CompleteCount>0" class="activespan">{{statuscount.CompleteCount}}</span>
                            <label>
                        </div>
                    </li>
                    <li class="menuli">
                        <div v-bind:class="{'aui-active':status==4}" v-on:click="randomSwitchBtn(4)">
                            <label class="labelbox">已取消
                                <span v-if="statuscount.CancelCount>0" class="activespan">{{statuscount.CancelCount}}</span>
                            <label>
                        </div>
                    </li>
                    

                </ul>
            </div>
        </div>
        <section id="main_refresh" class="aui-refresh-content">
        <div v-if="orderlist.length>0" class="orderlist">
            <div class="order_list_item" v-for="item in orderlist">
                <div class="gwc_item_name">
                    <div class="gwc_item_title">
                        <!-- <div v-if="item.OrderStatus==" class="order_num "><span>{{item.OrderStatusDesc}}...</span></div> -->
                        <div class="order_num "><span>{{item.OrderStatusDesc}}...</span></div>
                        <span class="item_title_type">{{item.AddTimeDesc}}</span>
                    </div>
                </div>
                <div class="order_product">
                    <ul class="aui-list aui-media-list" style="background-size:100% 0px; border: none;">
                        <li v-if="item.ProductList!=undefined&&item.ProductList.length==1" v-for="item2 in item.ProductList" class="aui-list-item" style="border: none;" v-on:click="open_order_detail(item.ID)">
                            <div class="aui-media-list-item-inner btn_line">
                                <div class="aui-list-item-media">
                                    <img :src="item2.ProductCoverImg">
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="pro-list-item-title aui-ellipsis-2">
                                        {{item2.Name}}
                                    </div>
                                </div>
                                <div class=" pro_price" style="margin: 12px 0 0 0;">
                                    <div class="item_price">
                                        ￥<span>{{item2.GoodsSalePrice==''?0:item2.GoodsSalePrice}}</span>
                                    </div>
                                    <div class="productNum">共{{item2.Quantity}}件</div>
                                </div>
                            </div>
                        </li>
                        <li v-if="item.ProductList!=undefined&&item.ProductList.length>1" class="aui-list-item"  style="border: none; position: relative;" v-on:click="open_order_detail(item.ID)">
                            <div class="pro_total">
                                <div class="item_price">
                                    ￥<span>{{item.AllPrice}}</span>
                                </div>
                                <div class="productNum">共{{item.AllQuantity}}件</div>
                            </div>
                            <div class="aui-media-list-item-inner btn_line proInfo">
                                <ul class="aui-tab-item" style="width:100%;">
                                    <li class="proli" v-for="item2 in item.ProductList">
                                        <div class="aui-list-item-media list-item-pic">
                                            <img :src="item2.ProductCoverImg">
                                        </div>
                                    </li>
                                    <li class="proli">
                                        <div class="aui-list-item-media list-item-pic">
                                        </div>
                                    </li>
                                </ul>
                            </div>

                        </li>

                    </ul>
                    <div class="order_pro_fw">
                        <div class="order_msg">
                            <div class="msg_item">
                                <div class="msgitem_title fl">配送地址</div>
                                <div class="msgitem_dec fr">{{item.AddressDetailInfo}}</div>
                            </div>
                            <div class="msg_item">
                                <div class="msgitem_title fl">预约送达时间</div>
                                <div class="msgitem_dec fr">{{item.AppointmentTime}}-{{item.AppointmentEndTime}}</div>
                            </div>
                            <div class="msg_item">
                                <div class="msgitem_title fl">联系买家</div>
                                <div class="msgitem_dec fr" v-on:click="tel_phone(item.UserPhoneNumber)">{{item.UserName==''?'--':item.UserName}}<i v-if="item.UserPhoneNumber" class="icon iconfont icon-dianhua1"></i></div>
                            </div>
                            <div class="msg_item">
                                <div class="msgitem_title fl">备注信息</div>
                                <div class="msgitem_dec fr aui-ellipsis-1">{{item.UserNote}}</div>
                            </div>
                        </div>
                        <div v-if="item.OrderStatus==1" class="order_pro_fk">
                            <div class="or_pro_rgt">
                                <div class="or_pro_fk" v-on:click="do_removeorder(item.ID)">取消订单</div>
                                <div class="or_pro_delete" v-on:click="open_editfeiyong(item.ID,item.ShipRateAmount,item.ShipTimeAmount,item.PackingFee,item.AllPrice)">修改费用</div>
                            </div>
                        </div>
                        <!-- v-if="item.OrderStatus==7" -->
                        <div v-if="item.OrderStatus==7" class="order_pro_fk">
                            <div v-if="!item.Selected" class="or_pro_lft" style="width: 40%;display: inline-flex;">
                                剩余时间<van-count-down millisecond :time="get_timer(item.ExpireTime)" format="mm:ss" @finish="finish(item)" style="line-height: 2rem; margin-left: 5px;" />
                            </div>
                            <div v-if="!item.Selected" class="or_pro_rgt" style="width: 60%;">
                                <div class="or_pro_fk" v-on:click="do_accept(item.ID)">接单</div>
                                <div class="or_pro_delete" v-on:click="do_refuse(item.ID)">拒绝</div>
                            </div>
                            <div v-if="item.Selected" class="or_pro_lft" style="width: 80%;">
                                接单已超时，订单失效
                            </div>
                        </div>
                        <div v-if="item.OrderStatus==5" class="order_pro_fk">
                            <div class="or_pro_rgt">
                                <div class="or_pro_fk" v-on:click="open_send(item.ID,item.AllQuantity,item.AllWeight,item.AddressDetailInfo)">发货</div>
                            </div>
                        </div>
                        <!-- v-if="item.OrderStatus==2" -->
                        <div v-if="item.OrderStatus==2&&item.PublishPointID<=0" class="order_pro_fk">
                            <div class="or_pro_rgt">
                                <div class="or_pro_fk" v-on:click="do_sureSend(item.ID)">确认送达</div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    

        <div v-if="orderlist.length<=0&&!is_searching" class="noshuju">
            <van-empty description="暂无数据" />
        </div>
    </section>

    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript " src="../script/vant/vue.js"></script>
<script type="text/javascript " src="../script/vant/vant.js"></script>
<script type="text/javascript" src="../script/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../script/aui-scroll.js"></script>
<script type="text/javascript " src="../script/moment/moment.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/page/dateRangeUtil.js"></script>
<script type="text/javascript " src="js/home_orderlist.js"></script>
<script type="text/javascript">
</script>

</html>